package biz.obake.team.android;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public abstract class d extends BitmapDrawable {

    /* renamed from: b  reason: collision with root package name */
    private static ExecutorService f1530b = Executors.newFixedThreadPool(1);
    /* access modifiers changed from: private */

    /* renamed from: c  reason: collision with root package name */
    public static Handler f1531c = new Handler();
    /* access modifiers changed from: private */

    /* renamed from: a  reason: collision with root package name */
    public Drawable f1532a;

    class a implements Runnable {

        /* renamed from: biz.obake.team.android.d$a$a  reason: collision with other inner class name */
        class C0060a implements Runnable {

            /* renamed from: b  reason: collision with root package name */
            final /* synthetic */ Drawable f1534b;

            C0060a(Drawable drawable) {
                this.f1534b = drawable;
            }

            public void run() {
                Drawable unused = d.this.f1532a = this.f1534b;
                d.this.invalidateSelf();
            }
        }

        a() {
        }

        public void run() {
            d.f1531c.post(new C0060a(d.this.c()));
        }
    }

    public d(Bitmap bitmap) {
        super(bitmap);
    }

    /* access modifiers changed from: protected */
    public abstract Drawable c();

    public synchronized d d() {
        f1530b.submit(new a());
        return this;
    }

    public void draw(Canvas canvas) {
        Drawable drawable = this.f1532a;
        if (drawable == null) {
            super.draw(canvas);
            return;
        }
        drawable.setBounds(getBounds());
        this.f1532a.draw(canvas);
    }
}
